<div class="col-lg-3 d-print-none">
  <div class="sidebar-panel">
  <div id="sidebar" class="mb-3">

  <% cache('related_sidebar-feature', skip_digest: true) do %>
    <%= feature('sidebar') %>
  <% end %>
<% if !@preview%>
  <div class="d-print-none">
    <%= render :partial => "like/like", :locals => {:node => @node, :tagnames => @tagnames } %>
  </div>
<% end %>

  <% if @node %>
    <%= render partial: "sidebar/events" %>
  <% end %>

  <% if @node && (@node.has_power_tag('iso') || @node.has_power_tag('lang')) %>
    <div class="alert alert-info">
        <h4><%= translation('sidebar._related.translation') %></h4>
        <div id="google_translate_element">
      <script type="text/javascript">
      function googleTranslateElementInit() {
        new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, autoDisplay: false, multilanguagePage: true}, 'google_translate_element');
        addLabelTranslateElement();
      }
      function addLabelTranslateElement() {
        var paragraph = document.createElement('span');
        paragraph.style.fontSize = '125%';
        document.getElementsByClassName("skiptranslate goog-te-gadget")[0].prepend(paragraph);
      }
    </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
        </div>
  </div>
  <% end %>

  <% responses = @node.responses if @node %>
  <% if @node && responses.length > 0 %>
    <%= render partial: 'sidebar/notes', locals: { notes: @node.responded_to, title: translation('sidebar._related.response_to'), node: @node } %>
  <% end %>

  <% if @node && @node.has_power_tag('response') %>
    <%= render partial: 'sidebar/notes', locals: { notes: @node.responses, title: translation('sidebar._related.responses_to_note'), node: @node } %>
  <% end %>

    <%= render partial: "sidebar/map" %>

  <br style="clear:both;" />

  </div>

  <% if @node %>
    <div id="sidebar-tags">
      <%= render partial: 'tag/tagging' %>
    </div>
  <% end %>

  <%= render partial: "home/social" %>

  <% unless current_user %>
    <% cache('related_sidebar-welcome', skip_digest: true) do %>
      <%= feature('sidebar-welcome') %>
    <% end %>
  <% end %>
  </div>
</div>
<%= javascript_include_tag 'sidebar' %>
